import { Entity, Column, PrimaryGeneratedColumn, CreateDateColumn } from 'typeorm';

@Entity({name: 'user'})
export class Account {
    @PrimaryGeneratedColumn()
    id: number;

    @Column()
    state: number;

    @Column({ length: 255 })
    username: string;

    @Column({ length: 255 })
    password: string;

    @Column({ length: 255 })
    nickname: string;

    @Column({ length: 255 })
    avatar: string;

    @CreateDateColumn({ type: 'datetime' }) // 使用 @CreateDateColumn 表示创建时间
    created_time: Date;

    @CreateDateColumn({ type: 'datetime' }) // 使用 @CreateDateColumn 表示创建时间
    modified_time: Date;
}
